<style>
    .create_form table {border:0px}
    .create_form td {border:0px}
</style>

<div style="margin:10px"> 
<h2>Edit category #<?=$data['category_id']?></h2>

<?if(!empty($error)):?>
<div class="error"><?=$error?></div>
<?endif?>

<form action="index.php?m=administration&a=edit_category&s=submit&category_id=<?=$data['category_id']?>" method="post">
<center>
<table width="450px" class="create_form">
<tr >
 <td  width="150"> Tên thư mục: 
 </td>
 <td> <input name="category_name" style="width:200px;" value="<?=$data['category_name']?>" type="text">
 </td>
</tr>

<tr>
 <td>
     Thư mục mẹ:
 </td>
 <td>
 <select name="parent_id">
    <option value="0">Root</option>
    <?foreach($structure as $c) :?>
        <? $id=$c['id']; $sep=str_repeat("&nbsp;&nbsp;&nbsp;",($c['level']))."|__";
        $selected = ($id==$data['parent_id'])? 'selected' : ''; ?>
        <?if(!in_array($id,$data['excluded_ids'])):?>
        <option value="<?=$id?>"  <?=$selected?>><?=$sep?><?=$categories[$id]['name']?></option>
        <?endif?>
    <?endforeach?>
 </select>
 </td>
</tr>

<tr>
 <td  >Thứ tự ưu tiên</td>
 <td>
	<input name="category_priority" value="<?=$data['category_priority']?>" style="width:50px;" type="text" value="0">
 </td>
</tr>
<tr>
   <td><input type="submit" value="Cập nhật"></td>
</tr>
</table>
</center>
</form>
</div>